import json

import requests

class trytry:
    def haha(self):

        url = 'http://test-profile.huimeionline.com/cdss/mayson/v_1_1/intelligent_recommendation'

        headers = {

            "Content-Type":"application/json;charset=UTF-8",
            "Huimei_id":"7195F12825788F09375C2DB1E922F108"
        }





        data = json.dumps({
	"serialNumber": "1562306045774",
	"inpatientDepartment": "呼吸科",
	"userGuid": "1561705496393",
	"doctorGuid": 1,
	"doctorName": "admin",
	"requestSource": 1,
	"patientInfo": {
		"gender": 1,
		"age": 22,
		"ageType": "岁"
	},
	"physicalSign": {
		"bodyTempr": "",
		"heartRate": "",
		"lowBldPress": "",
		"highBldPress": ""
	},
	"pageSource": 2,
	"progressNoteList": [{
		"progressGuid": "2677",
		"progressType": 2,
		"msgType": 2,
		"messageList": [{
			"key": "文档标题",
			"value": ""
		}, {
			"key": "主诉",
			"value": ""
		}, {
			"key": "现病史",
			"value": ""
		}, {
			"key": "病例特点",
			"value": ""
		}, {
			"key": "体格检查",
			"value": ""
		}, {
			"key": "辅助检查",
			"value": ""
		}, {
			"key": "初步诊断",
			"value": ""
		}, {
			"key": "诊断依据",
			"value": ""
		}, {
			"key": "诊断及鉴别诊断",
			"value": ""
		}, {
			"key": "诊疗计划",
			"value": ""
		}, {
			"key": "鉴别诊断",
			"value": ""
		}, {
			"key": "主诊断",
			"value": ""
		}, {
			"key": "质控诊断",
			"value": ""
		}]
	}],
	"v": 1562311331232
})

        res = requests.post(url,headers=headers,data=data)

        print(res.json())

        res_json = res.json()

        qualityList = res_json['body']['qualityControlResponse']['illnessAssessList']

        for item in qualityList:
            print(item['assessItem'])


a = trytry()

a.haha()